Skip to content

fix: resolve solution-wide analyzer warnings#2268

Merged
glennawatson merged 1 commit into
mainfrom
CP_resolve-analyzer-warnings
Jul 21, 2026
Merged

fix: resolve solution-wide analyzer warnings#2268
glennawatson merged 1 commit into
mainfrom
CP_resolve-analyzer-warnings

Conversation

@ChrisPulman

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

Build-quality maintenance that resolves the solution-wide active analyzer diagnostics through code changes and dependency alignment, without adding diagnostic suppressions.

What is the new behavior?

  • Updates SharpAnalyzers and the centralized package versions included in this branch.
  • Refactors generator, runtime, reflection, polyfill, benchmark, sample, and test code to comply with the active analyzer rules.
  • Extracts stateless streaming JSON deserialization, scopes the .NET 8 overload-priority polyfill, and adds deterministic shared HTTP test-client creation.
  • Aligns the Reflection changes added recently on main, including helper accessibility, member ordering, string construction, and HTTP client ownership.
  • Builds the full solution cleanly in Debug and Release and passes the complete TUnit target matrix.

What is the current behavior?

The prior solution emits analyzer errors and warnings across production, generator, sample, benchmark, and test projects. Some test helpers also expose broader accessibility or shorter HTTP client lifetimes than their actual usage requires.

Checklist

  • Tests have been added or updated (for bug fixes / features)
  • Docs have been added or updated (for bug fixes / features)
  • Changes target the main branch
  • PR title follows Conventional Commits

Additional information

Validation run from src:

  • dotnet restore Refit.slnx --nologo
  • dotnet build Refit.slnx -c Debug --no-restore --nologo: 0 warnings, 0 errors
  • dotnet build Refit.slnx -c Release --no-restore --nologo: 0 warnings, 0 errors
  • dotnet test Refit.slnx --no-restore --no-build: 7,341 passed, 0 failed, 0 skipped
  • Solution line coverage: 79.93% (3,824/4,784 lines)

Central package updates in this branch include ReactiveUI.Primitives 7.0.0, SharpAnalyzers 3.33.0, ASP.NET Core 9.0.18/10.0.10, Microsoft.Extensions 10.0.10, System.Text.Json 10.0.10, and Microsoft.SourceLink.GitHub 10.0.301.

There are no public API baseline changes. Existing trim/AOT annotations moved with extracted implementation code; no new analyzer bypass was added.

Analyzer compliance:
- update SharpAnalyzers and align centralized dependency versions
- refactor generator, runtime, reflection, polyfill, benchmark, sample, and test code to satisfy active rules
- extract stateless streaming JSON deserialization helpers and scope the net8 overload-priority polyfill

Test infrastructure:
- add a shared HttpClient test factory and update owned test clients
- compose the exported code-fix provider without duplicate MEF registration
- narrow helper visibility to its actual assembly scope

Validation:
- Debug and Release solution builds complete with 0 warnings and 0 errors
- Microsoft Testing Platform/TUnit passes 7,341 tests with 0 failures and 0 skips
- solution line coverage is 79.93%
@sonarqubecloud

Copy link
Copy Markdown

@ChrisPulman
ChrisPulman marked this pull request as ready for review July 21, 2026 11:45
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8382bed) to head (631b6a4).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2268   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          187       191    +4     
  Lines         9835      9829    -6     
  Branches      1895      1894    -1     
=========================================
- Hits          9835      9829    -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glennawatson
glennawatson merged commit aa2229b into main Jul 21, 2026
17 checks passed
@glennawatson
glennawatson deleted the CP_resolve-analyzer-warnings branch July 21, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants